package com.tc;

import com.tc.beans.UserServiceImpl;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther: tianchao
 * @Date: 2022/1/8 22:46
 * @Description:
 */
@Configuration
@ComponentScan(value = {"com.tc.beans"})
public class MainStart {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(MainStart.class);
		UserServiceImpl bean = annotationConfigApplicationContext.getBean(UserServiceImpl.class);
		bean.sayHi();
	}
}
